extends Node2D

signal player_won
@onready var pick_up_area: Area2D = $PickUpArea
@onready var animation_player: AnimationPlayer = $AnimationPlayer

func _ready() -> void:
	pick_up_area.area_entered.connect(on_area_entered)
	
func on_area_entered(area_2d):
	animation_player.play("up")
	player_won.emit()
	$CPUParticles2D.emitting = true
	$AudioStreamPlayer.play()
